{extend name='public/base'/}
{block name='header'}{/block} {//关掉头部}
{block name='menu'}{/block} {//关掉菜单}
{block name='seo'}
<title>{$title|default="标题"}</title>
<meta name="keywords" content="{$keywords|default='关键字'}">
<meta name="description" content="{$desc|default='描述'}">
{/block}

{block name='content'}
<article class="cl pd-20">

    <form action="" method="post" class="form form-horizontal" id="form-result-add">
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>学号：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input  type="text" style="width: 150px" class="input-text" value="" placeholder="" id="stuid" name="stuid">

                <label style="margin-left: 40px"><span class="c-red">*</span>大学英语：</label>
                <input  type="text" style="width: 150px" class="input-text" value="" placeholder="" id="english" name="english">
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>姓名：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input  type="text" style="width: 150px" class="input-text" value="" placeholder="" id="name" name="name">

                <label style="margin-left: 40px"><span class="c-red">*</span>操作系统：</label>
                <input  type="text" style="width: 150px" class="input-text" value="" placeholder="" id="czxt" name="czxt">
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>形式与政策：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input  type="text" style="width: 150px" class="input-text" value="" placeholder="" id="xsyzc" name="xsyzc">

                <label style="margin-left: 40px"><span class="c-red">*</span>大学体育：</label>
                <input  type="text" style="width: 150px" class="input-text" value="" placeholder="" id="dxty" name="dxty">
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>数据结构课程设计：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input  type="text" style="width: 150px" class="input-text" value="" placeholder="" id="sjjgkcsj" name="sjjgkcsj">

                <label style="margin-left: 40px"><span class="c-red">*</span>组成原理：</label>
                <input  type="text" style="width: 150px" class="input-text" value="" placeholder="" id="zcyl" name="zcyl">
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>概率论与数理统计：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input  type="text" style="width: 150px" class="input-text" value="" placeholder="" id="gll" name="gll">

                <label style="margin-left: 40px"><span class="c-red">*</span>暑假实践：</label>
                <input  type="text" style="width: 150px" class="input-text" value="" placeholder="" id="sjsj" name="sjsj">
            </div>
        </div>

        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <input style="margin-left: 150px" class="btn btn-primary radius disabled" type="button" value="&nbsp;&nbsp;提交&nbsp;&nbsp;" id="submit" >
            </div>
        </div>
    </form>


</article>
{/block}

{block name='js'}
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="__STATIC__/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
<script type="text/javascript" src="__STATIC__/lib/jquery.validation/1.14.0/validate-methods.js"></script>
<script type="text/javascript" src="__STATIC__/lib/jquery.validation/1.14.0/messages_zh.js"></script>




<script>

    $(function(){

        //防止用户无更新提交,只有表中数据有变化时才允许提交
        $("form").children().change(function(){
            $("#submit").removeClass('disabled');
        });


        $("#submit").on("click", function(event){
            $.ajax({
                type: "POST",
                url: "{:url('result/addResult')}",
                data: $("#form-result-add").serialize(),
                dataType: "json",
                success: function(data){
                    if (data.status == 1) {
                        alert(data.message);

                    } else {
                        alert(data.message);

                    }
                }
            });

        })
    })
</script>
{/block}

</body>
</html>